package com.lanou.mapper;

import com.lanou.bean.AdminInfo;
import com.lanou.bean.AdminModule;
import com.lanou.bean.ModuleInfo;
import com.lanou.bean.RoleInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminInfoMapper {
    AdminInfo selectAdmin(@Param("name") String username);

    List<AdminModule> selectAllAdminInfo();

    AdminModule selectAllAdmin(@Param("admin_id") int admin_id);

    List<ModuleInfo> selectModulesByAdminId(@Param("admin_id") int admin_id);

    void delectAdmin(@Param("admin_id") int admin_id);

    void insertAdmin(AdminInfo adminInfo);


    AdminModule seleAdminInfoById(@Param("admin_id") int id);

    void upDataAdminInfo(@Param("name") String name, @Param("namecode") String namecode,
                         @Param("tel") String tel, @Param("email") String email
            , @Param("adminid") int adminId);

    void updateAdmin(@Param("adminName") String adminName, @Param("tele") String tele,
                     @Param("email") String email, @Param("adminId") int adminID);

    void updataPsw(@Param("psw") String psw, @Param("adminId") int adminId);


    List<AdminModule> searchAdminInfo(@Param("name") String name);

}